<?php
/**
 * Desc:
 * Auth: Shaoming Lu<lushao1012@163.com>
 * Date: 2018/4/10
 * Time: 15:06
 */
namespace app\controller;

use echophp\core\Controller;
use echophp\core\Db;
use \echophp\core\Request;
use echophp\core\Session;

class IndexController extends Controller
{
    public function index()
    {
//        $db =new Db();
//        $res = $db->execute('SELECT id,form_model_general_model_name FROM oa_form_zbconfig_model_general');
//        var_dump($res);
//        // 可以通过两种方式向视图传值，$this->assign($name, $value)和render()方法
//        $this->assign('name','lushaoming');
//        $this->render('index.index', [
//            'a'    => '1',
//            'b'    => '2',
//            'name' => 'liujuan',
//        ]);



//        var_dump($res);
    }

    public function a()
    {
        $request = new Request();
        $data = $request->method();
        var_dump($data);
    }

    public function b()
    {
//        session::(['a'=>'a']);
        Session::set_session(['a'=>'a']);
    }
}